minibuffer-allow-text-properties can be buffer-local and affects completions
authorJuri Linkov <juri@linkov.net>
Mon, 27 May 2024 18:18:17 +0000 (21:18 +0300)
committerJuri Linkov <juri@linkov.net>
Mon, 27 May 2024 18:19:53 +0000 (21:19 +0300)
commit2cadad6f8ce47921cb014d2c5dd3e897e85c47ce
tree75a925557845a41af3588289e99054d244913a5c
parent804f36d5abdbc38a4664a341aaea563195f79b03
minibuffer-allow-text-properties can be buffer-local and affects completions

* doc/lispref/minibuf.texi (Text from Minibuffer): Mention that
minibuffer-allow-text-properties can be let-bound or buffer-local
in the minibuffer.  Correct the description of
minibuffer-allow-text-properties to explain what it did
even before applying code changes in this patch.
Remove wrong example for read-no-blanks-input.

* lisp/imenu.el (imenu--completion-buffer): Set buffer-local
minibuffer-allow-text-properties to t.
(imenu--completion-buffer): Get text property 'imenu-choice'.
(imenu--flatten-index-alist): Propertize annotation
with text property 'imenu-choice'.

* lisp/simple.el (choose-completion): Don't remove text properties
from the returned completion string since the value of
minibuffer-allow-text-properties is already respected
in completion--replace.

* src/minibuf.c (read_minibuf): Preserve text properties not only
when allow_props is non-nil but also in case when
minibuffer_allow_text_properties is non-nil.
(Fread_from_minibuffer): Mention in the docstring that
minibuffer-allow-text-properties can be buffer-local in the minibuffer.
(minibuffer-allow-text-properties): Improve docstring to describe
when text properties are discarded.

https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00949.html
doc/lispref/minibuf.texi
etc/NEWS
lisp/imenu.el
lisp/simple.el
src/minibuf.c